
<div class="row">
<?if(isset($system_message))echo $system_message;?>

	<?if(!empty($school_year_data)):?>
		<div>
			<div class="panel">School Year/Academic Year</div>
			<table class="table table-striped table-bordered">
				<thead>
				<tr>
					<th class="center">School Year From</th>
					<th class="center">School Year To</th>
					<th class="center">Description</th>
					<th class="center">Current</th>
					<th>&nbsp;</th>
					<th>&nbsp; Parent Registration Open?</th>
				</tr>
				</thead>
				<tbody>
				<?foreach($school_year_data as $syd):?>
					<tr>
						<td style="text-align:center;"><?=$syd->sy_from;?></td>
						<td style="text-align:center;"><?=$syd->sy_to;?></td>
						<td style="text-align:center;"><?=$syd->desc;?></td>
						<?if($syd->is_set == 'yes'):?>
							<td style="text-align:center;"><?if($syd->is_set == 'yes'):?><i class="icon-ok"><?else:endif;?></i></td>
							<td style="text-align:center;">&nbsp;</td>
						<?else:?>
							<td style="text-align:center;"><i class="icon-remove"></td>
							<td style="text-align:center;"><a href="<?=site_url('admin/set_school_year').'/'.$syd->id;?>" class="confirm btn btn-mini" title="set as current year?">set school year</a></td>
						<?endif;?>
						<td style="">
							<?if($syd->open_portal_reg === "1"):?>
								<span class="badge badge-success">Yes</span> &nbsp; <a href="<?=site_url('admin/set_school_year_open_reg').'/0/'.$syd->id;?>" class="confirm btn btn-mini" title="Close parent Registration for this year?">Click to close</a>
							<?else:?>
								<span class="badge badge-important">No</span> &nbsp; <a href="<?=site_url('admin/set_school_year_open_reg').'/1/'.$syd->id;?>" class="confirm btn btn-mini" title="Open parent Registration for this year?">Click to Open</a>
							<?endif;?>
						</td>
					</tr>	
				<?endforeach;?>
				</tbody>
			</table>
			<a href="<?=site_url('admin/add_school_year');?>" class="btn btn-mini btn-primary">Add School Years</a></td>
		</div>
	<?else:?>
		<div class="alert-box">
			WARNING! No Academic Year available <a href="<?=site_url('admin/add_school_year');?>" class="btn btn-small btn-success">Add Schoolyear</a>
		</div>
	<?endif;?>
</div>